#ifndef _RMRIO_H
#define _RMRIO_H

/*
 * RMRIO.h
 * 
 * Inputs and outputs on the robot, joysticks, and driver station
 * 
 */





/***************************************************************************
 * Inputs and outputs on the cRIO
 ***************************************************************************/


/*
 * Slot Definitions
 * 
 */

#define SIDECAR_1	4
#define SIDECAR_2	6
#define ANALOG		1
#define SOLENOID	8




/*
 * INPUTS...
 */

/*
 * Sidecar 1 : digital IO (all are inputs)
 */
#define AUTO_MODE_0			1
#define AUTO_MODE_1			2
#define STEER_ENCODER		3
#define STEER_LIMIT_LEFT	4
#define STEER_LIMIT_RIGHT	5
#define BALL_COUNTER		6
#define MAX_PRESSURE		7

/*
 * Sidecar 2 : digital IO (all are inputs)
 */
#define LEFT_FRONT_ENCODER_A	1
#define LEFT_FRONT_ENCODER_B	2
#define RIGHT_FRONT_ENCODER_A	3
#define RIGHT_FRONT_ENCODER_B	4
#define LEFT_BACK_ENCODER_A		5
#define LEFT_BACK_ENCODER_B		6
#define RIGHT_BACK_ENCODER_A	7
#define RIGHT_BACK_ENCODER_B	8
#define CONVEYOR_ENCODER_A		9
#define CONVEYOR_ENCODER_B		10

/*
 * Analog inputs
 */
#define ACCEL_X		1
#define ACCEL_Y		2





/*
 * OUTPUTS
 */

/*
 * Sidecar 1 : motor channels
 */
#define LEFT_FRONT_MOTOR_CHANNEL	1
#define RIGHT_FRONT_MOTOR_CHANNEL	2
#define LEFT_BACK_MOTOR_CHANNEL		3
#define RIGHT_BACK_MOTOR_CHANNEL	4
#define STEER_MOTOR_CHANNEL			5
#define RIGHT_CONVEYOR_CHANNEL		1 //6
#define LEFT_CONVEYOR_CHANNEL		7

/*
 * Sidecar 2 : relays
 */
#define COMPRESSOR_RELAY	1

/*
 * Solenoid outputs
 */
#define SHOOTER_EXTEND	1
#define SHOOTER_RETRACT	2
#define DOOR_EXTEND		3
#define DOOR_RETRACT	4





/***************************************************************************
 * Inputs on the Steering Wheel
 ***************************************************************************/
#define STEERING_WHEEL_CHANNEL	1

#define FRONT_BRAKE_BUTTON			11 //1// forward on stick
#define BACK_BRAKE_BUTTON			10 //2// backward on stick
#define TRACTION_DISABLE			7 // top left
#define ATTACK_MODE					3 // top right
#define PID_RESET_BUTTON			6 //8 // bottom left
#define ACCEL_CALIBRATE_BUTTON 		9 //11 // nothing
#define STEERING_CALIBRATE_BUTTON	8 // 10 // calibrate steering

#define TEST_FIRE_BUTTON		5 // right pedal


// we need the second joystick only for 2-joystick PID tank drive
// OR for manipulator control
#define JOYSTICK2_CHANNEL		2

#define SHOOT_BUTTON_JOY			1
#define CONVEYOR_FWD_JOY			6
#define CONVEYOR_RVS_JOY			7






/***************************************************************************
 * Inputs and outputs on the driver station
 ***************************************************************************/
//#define SHOOT_BUTTON			1
//#define CONVEYOR_ON_SWITCH		2
//#define DOOR_OVERRIDE_BUTTON	3


#endif
